﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace CPPProject.CPP
{
    /// <summary>
    /// 资产档案表
    /// </summary>
    [Table("CPPPart")]
    public class CPPPart : Entity<Guid>, IHasCreationTime, IMustHaveTenant, IModificationAudited, ICreationAudited
    {
        public int TenantId { get; set; }
        public DateTime CreationTime { get; set; }
        public long? CreatorUserId { get; set; }
        public long? LastModifierUserId { get; set; }
        public DateTime? LastModificationTime { get; set; }        
        /// <summary>
        /// 资产编码
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string PartNum { get; set; }
        /// <summary>
        /// 资产名称
        /// </summary>
        [Required]
        [MaxLength(500)]
        public string Name { get; set; }
        /// <summary>
        /// 资产描述
        /// </summary>
        [MaxLength(500)]
        public string Description { get; set; }
        /// <summary>
        /// 资产图片，存储在Attachment附件表中
        /// </summary>
        [MaxLength(500)]
        public string ImageUrl { get; set; }        
        /// <summary>
        /// 资产价值
        /// </summary>
        public decimal MtlCost { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        [MaxLength(10)]
        public string IUM { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }
    }
}
